package design_pattern.WorkerThreadMode;

/**
 * @Author: 蔡翔
 * @Date: 2019/11/19 10:25
 * @Version 1.0
 */
public class Request {
    private final String name;
    private final int number;
    public Request(String name,int number){
        this.name = name;
        this.number = number;
    }

    public void execute(){
        System.out.println(Thread.currentThread().getName()+" executed " +this);
    }

    @Override
    public String toString() {
        return "Request=> no."+number+" name no."+name;
    }
}
